{include file="frontend/$theme/header.tpl" title="header" }
<script src="{$baseurl}/javascript/product.js"></script>
<div id="main_wrapper"align="center" class="clearfix">
<div id="inner_wapr" class="clearfix"> 
	{include file="frontend/$theme/leftmenu.tpl" title="leftmenu" }
    
   
            
     <div class="right_pane">
       <h1> Shopping Cart </h1>
        <form id="cart_form" action="{$baseurl}/cart.php" >
    <input type="hidden" name="action" value="updateCart" />
        <div class="main_product_pane">
      	
         {assign var='total_price' value=0}
         {foreach from=$cart_contents item=row}
         {assign var='total_price' value=$total_price+$row.sub_total}
            
            <div id="mumber_area">
            <div class="siz_and_imgz"> 
            
            {if $row.thumb_image ne '' && file_exists("`$basedir`/images/product/`$row.thumb_image`")}
                <img src="{$baseurl}/images/product/{$row.thumb_image}" />
            {else} 
                <img height="110px" src="{$baseurl}/images/noimage.png" />
            {/if}
            

            
            {if $row.size ne ''}
              <h3>Size :{$row.size}</h3>
            {/if} 
            {if $row.color ne ''} 
              <h4>{$row.color}</h4>
            {/if}  
               <div class="pnamediv">{$row.name} </div>
            </div>
            <div class="quanity">
              <h2> Quality </h2>
              <p>
              	<input type="text" value="{$row.quantity}" id="quantity_{$row.product_id}" name="quantity[]" style="width:70px" /> 
                <input type="hidden" value="{$row.product_id}" id="product_{$row.product_id}" name="product_id[]" style="width:70px" />
              </p>
            </div>
            <div class="quanity">
              <h2> Unit Prict </h2>
              <p>{$row.price}$</p>
            </div>
            <div class="quanity">
              <h2>  Total </h2>
              <p>{$row.sub_total}$</p>
            </div>
            <div class="quanity" style="border-right:none;" align="right"> <a href="{$baseurl}/cart.php?action=removeProductFromCart&product_id={$row.product_id}"><img src="{$imgurl}/remove.png" /></a> </div>
          </div>
            
         {foreachelse}
                    <div class="emptycart"><h2>No item in cart. Cart is empty.</h2></div>

        {/foreach}
        
        {if $cart_contents|@count gt 0}
        
           <div id="mumber_update_odr">
            <p><strong>Total :</strong> <span>{$total_price}$</span></p>
            <a href="javascript:void(0)" onclick="$('#cart_form').submit();"><img src="{$imgurl}/update_cart.png" /></a>
            <a href="{$baseurl}/cart.php?action=order_form" ><img src="{$imgurl}/place_odr.png" /></a>
            </div>
        {/if}	
        	
          
          
                   
          
        </div> </form>
     </div>	
    
   
    {*
	  <div class="right_pane">
      
     
      <div class="main_product_pane">
        <div id="product_detail_dv">
          
          <form id="cart_form" action="{$baseurl}/cart.php" >
          	<input type="hidden" name="action" value="updateCart" />
          <div class="right_box">
          	 cart listing
             
             {assign var='total_price' value=0}
             {foreach from=$cart_contents item=row}
             {assign var='total_price' value=$total_price+$row.sub_total}
                
                <p> 
                	{$row.name}
                    {$row.thumb_image}
                    {$row.color}
                    {$row.size}
                    <input type="text" value="{$row.quantity}" id="quantity_{$row.product_id}" name="quantity[]" style="width:70px" /> 
                    <input type="hidden" value="{$row.product_id}" id="product_{$row.product_id}" name="product_id[]" style="width:70px" /> 
                    {$row.price}
                    {$row.sub_total}
               
               		<input type="button" value="Remove" onclick="location.href='{$baseurl}/cart.php?action=removeProductFromCart&product_id={$row.product_id}'" />
                
                </p>
                
             {foreachelse}
            	Currently cart is empty.
            {/foreach}
            
            {if $cart_contents|@count gt 0}
            
                <br />
                Total : {$total_price}
            	<input type="button" value="Update Cart" onclick="$('#cart_form').submit();" />
            	<input type="button" value="Place Order" onclick="location.href='{$baseurl}/cart.php?action=order_form'" />
            {/if}
             
          </div> <!--end right box div-->
          </form>
        </div>
       
      </div>
     
      
    
        <div class="clr">&nbsp;</div>
  </div>
 	*} 
</div>
{include file="frontend/$theme/footer.tpl" title="footer" }
